﻿using System;
using System.Linq;
using System.Threading;
using System.Threading.Tasks;
using Common;
using Common.Base;
using Common.Contexts;
using Common.Helper;
using Common.Interceptors;
using Microsoft.EntityFrameworkCore;
using Microsoft.EntityFrameworkCore.Infrastructure;
using Microsoft.Extensions.DependencyInjection;
using Model.Entity;
using Snowflake.Net;

namespace Repository
{
    public class TestDbContext : DefaultDbContext
    {
        public TestDbContext(DbContextOptions<TestDbContext> options) : base(options)
        {
        }
        
        protected override void OnConfiguring(DbContextOptionsBuilder optionsBuilder)
        {
            // 清除跟踪的实体状态
            // ChangeTracker.Clear();
            base.OnConfiguring(optionsBuilder);
        }

        /// <summary>
        /// 用户表
        /// </summary>
        public DbSet<UserInfo> TestUsers { get; set; }
    }
}